]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Do not shadow ClutterActor's destroy()
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 5 Dec 2017 22:04:24 +0000 (17:04 -0500)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 5 Dec 2017 23:07:00 +0000 (18:07 -0500)
Since commit ef1e27966db2 turned DashItemContainer into an StWidget,
the destroy() method overrides the ClutterActor method, which is at
the very least bad style. Instead, follow the usual pattern of using
a ::destroy handler.

https://bugzilla.gnome.org/show_bug.cgi?id=791233

js/ui/dash.js

index b89040bb6e396e3ef69cd1abd153400b16b0e7ff..43b7c4450ae4a29e8bb5ec40bcc074f5456fc31c 100644 (file)
@@ -50,6 +50,10 @@ var DashItemContainer = new Lang.Class({
         this._childScale = 0;
         this._childOpacity = 0;
         this.animatingOut = false;
+
+        this.connect('destroy', () => {
+            this.label.destroy();
+        });
     },
 
     vfunc_allocate: function(box, flags) {
@@ -177,11 +181,6 @@ var DashItemContainer = new Lang.Class({
                          });
     },
 
-    destroy: function() {
-        this.label.destroy();
-        this.parent();
-    },
-
     animateOutAndDestroy: function() {
         this.label.hide();